package StudyCode.summary.mycollection;

import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetEnumerationForHashSet {
	public static void main(String[] args) {
		HashSet hashSet = new HashSet();
		hashSet.add("A");
		hashSet.add("B");
		hashSet.add("D");
		hashSet.add("E");
		hashSet.add("F");

		Enumeration e = Collections.enumeration(hashSet);

		System.out.println("获取 HashSet 的枚举(Enumeration)");
		while (e.hasMoreElements())
			System.out.println(e.nextElement());
	}
}
